<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="登录">
<meta name="description" content="登录">
<meta name="author" content="yinq">
<title>登录</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<!-- 基础样式库 -->
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/animate.min.css">
<link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/style.min.css">
<style>
</style>
</head>

<body class="bg-white overflow-x-hidden">
<div class="row bg-white vh-100">
  <div class="col-md-6 col-lg-7 col-xl-8 d-none d-md-block" style="background-image: url({{cdn}}/static/v5/images/login-bg-1.jpg); background-size: cover;">

    <div class="d-flex vh-100">
      <div class="p-5 align-self-end">

        <br><br><br>
        <p class="text-white"><h4>全新的宝塔虚拟主机管理面板</h4>  。</p>
      </div>
    </div>

  </div>

  <div class="col-md-6 col-lg-5 col-xl-4 align-self-center">
    <div class="p-5">
     <div class="text-center">
        <a href="index.html"> <img alt="light year admin" src="{{cdn}}/static/v5/images/login.png"> </a>
      </div>
      <p class="text-center text-muted"><small>请使用您的账号登录系统</small></p>


        <div class="mb-3">
          <label for="username">用户名</label>
          <input type="text" class="form-control" id="username" value="" required>
        </div>

        <div class="mb-3">
          <label for="password">密码</label>
          <input type="password" class="form-control" id="password" value="" required>
        </div>


        <div class="mb-3 d-grid">
          <button class="btn btn-primary" id="login"type="submit">立即登录</button>
        </div>

      <p class="text-center text-muted mt-3">Copyright © 2023 <a target="_blank" href="http://www.qingningz.cn">青柠博客</a>. All right reserved</p>
    </div>
  </div>
</div>
<div id="comm" style="display:none;">{{ Comm }}</div>
<script type="text/javascript" src="{{cdn}}/static/v5/example/js/jquery.min.js"></script>
<script type="text/javascript" src="{{cdn}}/static/v5/example/js/layer/layer.js"></script>


<script type="text/javascript">
$(document).ready(function() {
  $("#login").click(function(event) {
    event.preventDefault();
    var user = $("#username").val();
    var pwd = $("#password").val();
    $.ajax({
      url: "/",
      method: "POST",
      data: {
        "username": user,
        "password": pwd
      },
      success: function(data) {
        if (data.code === 200) {
          layer.msg(data.msg, function(){
            //关闭后的操作
            window.location.href = '/framework';
        });
          
        } else {
          layer.msg(data.msg);
        }
      }
    });
  });
});
</script>
</body>
</html>